package com.ltkj.shop.controller.mobile;

import com.ltkj.common.core.web.controller.BaseController;
import com.ltkj.common.core.web.domain.AjaxResult;
import com.ltkj.shop.domain.ShopGoodsCategory;
import com.ltkj.shop.service.IShopGoodsCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 文创商品类别Controller
 * 
 * @author xupf
 * @date 2023-08-29
 */
@Api(tags = "文创商品类别移动端接口")
@RestController
@RequestMapping("mobile/goods/category")
public class ShopGoodsCategoryMobileController extends BaseController
{
    @Autowired
    private IShopGoodsCategoryService shopGoodsCategoryService;

    /**
     * 查询文创商品类别
     */
    @ApiOperation("查询文创商品类别")
    @GetMapping("/search")
    public AjaxResult search(ShopGoodsCategory shopGoodsCategory)
    {
        // 移动端只查询 启用 状态的数据
        shopGoodsCategory.setEnable("1");
        List<ShopGoodsCategory> list = shopGoodsCategoryService.selectShopGoodsCategoryList(shopGoodsCategory);
        return success(list);
    }
}
